import request from '@/utils/request'

export function getUserList(params) {
  return request({
    url: '/user/list',
    method: 'get',
    params
  })
}

export function getUserData() {
  return request({
    url: '/user/info',
    method: 'get',
  })
}

export function createUser(params) {
  return request({
    url: '/user/insert',
    method: 'post',
    data: params
  })
}

export function updateUser(params) {
  return request({
    url: '/user/update',
    method: 'post',
    data: params
  })
}

export function deleteUser(params) {
  return request({
    url: '/user/delete',
    method: 'post',
    data: params
  })
}

export function getRoleTypes(params) {
  return request({
    url: '/role/list',
    method: 'get',
    params
  })
}
export function getRole(params) {
  return request({
    url: '/userRole',
    method: 'get',
    params
  })
}

export function getEngineerList() {
  return request({
    url: '/user/engineerlist',
    method: 'get',
  })
}
